Monaco Editor에 Prettier 포맷터를 통합하여 에디터 내에서 단축키를 통해 코드 포맷팅 기능 추가#19
Merged
Bori-github merged 5 commits intomainfrom Nov 5, 2025
Merged
Monaco Editor에 Prettier 포맷터를 통합하여 에디터 내에서 단축키를 통해 코드 포맷팅 기능 추가#19Bori-github merged 5 commits intomainfrom
Bori-github merged 5 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR integrates Prettier code formatting into the Monaco code editor widget, enabling automatic code formatting with a keyboard shortcut.
- Imports Prettier standalone library with Babel and ESTree plugins
- Registers a Monaco document formatting provider that formats code using Prettier
- Adds Cmd+Shift+F keyboard shortcut to trigger code formatting
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
기능 추가되면 docs에도 같이 설명 추가하고 이러면 더 조을것 같아요 |
ohah
approved these changes
Nov 4, 2025
Collaborator
Author
Owner
Collaborator
Author
|
@ohah 그럼 settings에 포맷팅 기능 추가되면 docs에 내용 추가할게요! |
ohah
pushed a commit
that referenced
this pull request
Dec 12, 2025
* feat: 단축키를 통해 prettier 포맷팅 지원 * fix: format check * chore: javascript/typescript 포맷터 등록 분리 * chore: 등록된 포맷터 컴포넌트 언마운트 시 해제하여 clean up 처리 * chore: 이전에 등록된 포맷터가 남아있는 경우, 먼저 해제하도록 코드 적용
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 요약
📝 작업 내용
prettier/standalone과 플러그인(babel,estree)을 사용하여 브라우저 환경에서 Prettier 실행registerDocumentFormattingEditProviderAPI를 사용하여 JavaScript 언어에 대한 포맷터 등록Cmd+Shift+F: 문서 전체 포맷팅 실행🔍 스크린샷
2025-11-04.3.15.53.mov
💡 참고 사항